package com.tjsinfo.tjsoa.workflow.bo;

import java.util.List;
import java.util.Map;

import com.tjsinfo.tjsoa.common.PaginationSupport;
import com.tjsinfo.tjsoa.workflow.Taskinstance;


public interface ITaskInstanceBO {
	public abstract PaginationSupport genZong(Long flowid, Integer first,
			Integer max);
	public PaginationSupport genZongIsNull(Long flowid, Integer first,
			Integer max);
	public Long selectTaskFlowId(Long flowid);
	public List<Taskinstance> selectAllTask(Long flowid);
	public List<Object[]>  selectAllUnfinshTask();
	public Integer taskTjsUserIsNull(Long flowid);
	/**
	 * 根据流程ID创建任务
	 * @param flowId 流程ID
	 * @param userId 用户ID
	 * @return
	 */
	public Boolean creatTask(Long flowId,String userId);
	public List<Taskinstance> selectAllTaskIsNull(Long flowid);
	/**
	 * 根据流程名称查询异常任务
	 * @param proname
	 * @return
	 */
	public Integer selectYiChangTask(String proname);
	
	/**
	 * 根据流程名称查询异常任务
	 * @return
	 */
	public Integer selectYiChangTask();
	
	/**
	 * 任务管理
	 * @return
	 */
	public List<Map<String, String>> taskAdmin();
	
	/**
	 * 根据人员ID和流程名称查询异常任务
	 * @param username
	 * @param proname
	 * @return
	 */
	public Integer selectUnTask(String username, String proname);
	
	/**
	 * 根据人员ID和流程名称查询任务返回流程实例ID
	 * @param username
	 * @param proname
	 * @return
	 */
	public List<Integer>  selectUnTaskProId(String username, String proname);
	
	/**
	 * 根据人员ID和变量名称查询变量值
	 * @param valuename
	 * @param processId
	 * @return
	 */
	public Integer selectValueBy(String valuename, Integer processId);
	
	/**
	 * 根据流程ID查询当前任务
	 * @param processId 流程ID
	 * @return
	 */
	public String selectNodeByProcessId(Integer processId);
	
	/**
	 * 根据流程ID查询某环节已结束任务
	 * @param processId 流程ID
	 * @return
	 */
		public PaginationSupport selectNodeTask(Long flowid,String node, Integer first,Integer max);

}